﻿using IconYuan.Model.Entity.Markets;
using IconYuan.Model.Entity.Orders;
using IconYuan.Model.Entity.Users;


namespace IconYuan.Model.DTO.Orders
{
    /// <summary>
    /// 待结算订单
    /// </summary>
    public class CheckOrderOut 
    {
        public int user_id { get; set; }
        /// <summary>
        /// 用户上一级
        /// </summary>
        public int parent_id { get; set; }
        /// <summary>
        /// 商品总金额(不含优惠折扣)
        /// </summary>
        public decimal goods_price { get; set; }
        /// <summary>
        /// 订单金额(含优惠折扣)
        /// </summary>
        public decimal order_price { get; set; }
        /// <summary>
        /// 实付金额(包含运费)
        /// </summary>
        public decimal pay_price { get; set; }
        /// <summary>
        /// 余额抵扣
        /// </summary>
        public decimal balance_money { get; set; }
        /// <summary>
        /// 优惠券ID
        /// </summary>
        public int coupon_id { get; set; }
        /// <summary>
        /// 优惠券抵扣金额
        /// </summary>
        public decimal coupon_money { get; set; }
        /// <summary>
        /// 等级抵扣金额
        /// </summary>
        public decimal grade_money { get; set; }
        /// <summary>
        /// 积分抵扣金额
        /// </summary>
        public decimal points_money { get; set; }
        /// <summary>
        /// 积分抵扣数量
        /// </summary>
        public int points_num { get; set; }
        /// <summary>
        /// 赠送积分数量
        /// </summary>
        public int points_gift { get; set; }
        /// <summary>
        /// 促销抵扣金额
        /// </summary>
        public decimal promotion_money { get; set; }
        /// <summary>
        /// 促销ID
        /// </summary>
        public int promotion_id { get; set; }
        /// <summary>
        /// 订单促销类型: 1单品促销(如：体验价), 2 满减促销(如：买多件优惠)
        /// </summary>
        public int promotion_type { get; set; }
        /// <summary>
        /// 配送费
        /// </summary>
        public decimal express_price { get; set; }
        /// <summary>
        /// 配送方式(10快递 ,20 同城配送, 30 自提)
        /// </summary>
        public int delivery_type { get; set; } = 10;
        /// <summary>
        /// 收货地址
        /// </summary>
        public string address { get; set; } = string.Empty;
        /// <summary>
        /// 门店id
        /// </summary>
        public int shop_id { get; set; }
        public int store_id { get; set; }

        /// <summary>
        /// 商品列表
        /// </summary>
        public List<OrderGoods> goods{ get; set; }
        /// <summary>
        /// 用户的优惠券列表
        /// </summary>
        public List<UserCoupon> couponList { get; set; } = new List<UserCoupon>();
 
        /// <summary>
        /// 收货人(自提联系方式)
        /// </summary>
        public UserAddress lastExtract { get; set; }
        /// <summary>
        /// 是否是升级VIP商品
        /// </summary>
        public bool IsUpgradeGoods { get; set; } = false;
        ///// <summary>
        ///// 自提门店信息
        ///// </summary>
        //public List<object> extractShop { get; set; }
        ///// <summary>
        ///// 是否存在收货地址
        ///// </summary>
        //public bool existAddress { get; set; } = false;
        ///// <summary>
        ///// 收货城市是否存在配送规则中
        ///// </summary>
        //public bool isIntraRegion { get; set; } = true;
        ///// <summary>
        ///// 是否允许使用积分抵扣
        ///// </summary>
        //public bool isAllowPoints { get; set; } = false;
        ///// <summary>
        ///// 是否使用积分抵扣（1使用 0不使用）
        ///// </summary>
        //public int isUsePoints { get; set; }


        ///// <summary>
        ///// 商品总额
        ///// </summary>
        //public decimal goodsPrice { get; set; }
        ///// <summary>
        ///// 订单金额（含优惠折扣）
        ///// </summary>
        //public decimal orderPrice { get; set; }
        ///// <summary>
        ///// 实付金额（订单金额 + 运费）
        ///// </summary>
        //public decimal orderPayPrice { get; set; }      
        ///// <summary>
        ///// 当前配送方式
        ///// </summary>
        //public int delivery { get; set; }
        ///// <summary>
        ///// 当前收货地址
        ///// </summary>
        //public string address { get; set; }
        ///// <summary>
        ///// 积分抵扣金额
        ///// </summary>
        //public decimal pointsMoney { get; set; }
        ///// <summary>
        ///// 赠送的积分数量
        ///// </summary>
        //public int pointsBonus { get; set; }

        ///// <summary>
        ///// 是否存在错误
        ///// </summary>
        //public bool hasError { get; set; } = false;
        ///// <summary>
        ///// 错误信息
        ///// </summary>
        //public string errorMsg { get; set; } = string.Empty;
    }

}